package site.marqstree.kotlin.library.good.ui.fragment.category

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import site.marqstree.kotlin.library.base.ui.fragment.BaseFragment
import site.marqstree.kotlin.library.base.util.callback.CallbackManager
import site.marqstree.kotlin.library.base.util.callback.CallbackType
import site.marqstree.kotlin.library.base.util.callback.IGlobalCallback
import site.marqstree.kotlin.library.good.R
import site.marqstree.kotlin.library.good.ui.fragment.category.centent.ContentFragment
import site.marqstree.kotlin.library.good.ui.fragment.category.list.CategoryListFragment
import site.marqstree.kotlin.library.good.ui.activity.goodlist.ActivityGoodList
import org.jetbrains.anko.startActivity

/*
 * 项目名: KotlinMall
 * 包名: site.marqstree.kotlin.library.good.ui.fragment.category
 * 文件名: CategoryFragment
 * 创建者: marqstree
 * 创建时间: 2020/3/6 14:57
 * 描述: 商品分类 Fragment
 */
class CategoryFragment: BaseFragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        super.onCreateView(inflater, container, savedInstanceState)
        return inflater.inflate(R.layout.fragment_category_main,null)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        val listFragment = CategoryListFragment()
        showFragment(R.id.mContainerCategoryList,listFragment)
        val contentFragment = ContentFragment()
        listFragment.mListener = contentFragment
        showFragment(R.id.mContainerCategoryContent,contentFragment)
    }
}